package ejb.dto;

import java.util.Date;

public class ReservationDTO {
	
	private int id;
	private Date dateReservation;
	private int excursionDates;
	private int hotelDates;
	private float price;
	private String userId;
	private PackageDTO pack;
	private FlightDTO flight1;
	private FlightDTO flight2;
	private HotelDTO hotel;
	private ExcursionDTO excursion;
	private UserDTO user;

	private int peopleNumber;
	private int packageId;
	private int outwardFlightId;
	private int inwardFlightId;
	private int hotelId;
	private int hotelAvailabilityId;
	private int excursionAvailabilityId;
	private HotelAvailabilityDTO hotelAvailability;
	private ExcursionAvailabilityDTO excursionAvailability;


	//GETTER AND SETTER
	
	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public Date getDateReservation() {
		return this.dateReservation;
	}

	public void setDateReservation(Date dateReservation) {
		this.dateReservation = dateReservation;
	}

	public int getExcursionDates() {
		return this.excursionDates;
	}

	public void setExcursionDates(int excursionDates) {
		this.excursionDates = excursionDates;
	}

	public int getHotelDates() {
		return this.hotelDates;
	}

	public void setHotelDates(int hotelDates) {
		this.hotelDates = hotelDates;
	}

	public float getPrice() {
		return this.price;
	}

	public void setPrice(float price) {
		this.price = price;
	}

	public UserDTO getUser() {
		return this.user;
	}

	public void setUser(UserDTO user) {
		this.user = user;
	}

	public PackageDTO getPackage() {
		return this.pack;
	}

	public void setPackage(PackageDTO pack) {
		this.pack = pack;
	}

	public FlightDTO getFlight1() {
		return this.flight1;
	}

	public void setFlight1(FlightDTO flight1) {
		this.flight1 = flight1;
	}

	public FlightDTO getFlight2() {
		return this.flight2;
	}

	public void setFlight2(FlightDTO flight2) {
		this.flight2 = flight2;
	}

	public int getPackageId() {
		return packageId;
	}

	public void setPackageId(int packageId) {
		this.packageId = packageId;
	}

	public int getHotelId() {
		return hotelId;
	}

	public void setHotelId(int hotelId) {
		this.hotelId = hotelId;
	}

	public int getHotelAvailabilityId() {
		return hotelAvailabilityId;
	}

	public void setHotelAvailabilityId(int hotelAvailabilityId) {
		this.hotelAvailabilityId = hotelAvailabilityId;
	}


	public int getExcursionAvailabilityId() {
		return excursionAvailabilityId;
	}

	public void setExcursionAvailabilityId(int excursionAvailabilityId) {
		this.excursionAvailabilityId = excursionAvailabilityId;
	}


	public int getOutwardFlightId() {
		return outwardFlightId;
	}

	public void setOutwardFlightId(int outwardFlightId) {
		this.outwardFlightId = outwardFlightId;
	}

	public int getInwardFlightId() {
		return inwardFlightId;
	}

	public void setInwardFlightId(int inwardFlightId) {
		this.inwardFlightId = inwardFlightId;
	}

	public int getPeopleNumber() {
		return peopleNumber;
	}

	public void setPeopleNumber(int peopleNumber) {
		this.peopleNumber = peopleNumber;
	}

	public HotelDTO getHotel() {
		return hotel;
	}

	public void setHotel(HotelDTO hotel) {
		this.hotel = hotel;
	}

	public HotelAvailabilityDTO getHotelAvailability() {
		return hotelAvailability;
	}

	public void setHotelAvailability(HotelAvailabilityDTO hotelAvailability) {
		this.hotelAvailability = hotelAvailability;
	}

	public ExcursionAvailabilityDTO getExcursionAvailability() {
		return excursionAvailability;
	}

	public void setExcursionAvailability(ExcursionAvailabilityDTO excursionAvailability) {
		this.excursionAvailability = excursionAvailability;
	}

	public ExcursionDTO getExcursion() {
		return excursion;
	}

	public void setExcursion(ExcursionDTO excursion) {
		this.excursion = excursion;
	}

	public float getHotelPrice() {
		return hotelAvailability.getPrice() * hotelAvailability.getDays();
	}

	public float getExcursionPrice() {
		return excursionAvailability.getExcursionPrice() * peopleNumber;
	}

	public String getUserId(){
		return this.userId;
	}
	
	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	public float getFlight1Price() {
		return flight1.getPrice() * peopleNumber;
	}
	
	public float getFlight2Price() {
		return flight2.getPrice() * peopleNumber;
	}
	
	public float getTotalPrice() {
		return getHotelPrice() + getExcursionPrice() + getFlight1Price() + getFlight2Price();
	}
}